package net.maku.events.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import net.maku.events.service.IndexService;
import net.maku.events.vo.ActivityBaseVO;
import net.maku.framework.common.utils.Result;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author: qr
 * @Date: 2025/4/12 14:43
 * @Version 1.0
 */
@RestController
@RequestMapping("wx/index")
@Tag(name = "小程序首页")
@AllArgsConstructor
public class IndexController {

    private final IndexService indexService;


    @GetMapping("top/activity")
    @Operation(summary = "获取置顶的活动")
    public Result<List<ActivityBaseVO>> topActivity() {
        return Result.ok(indexService.topActivity());
    }
}
